Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 12, 2026

The upgrade to @faker-js/faker 10.3.0 introduced ES module imports that Jest couldn't transform, causing SyntaxError: Cannot use import statement outside a module in test files.

Changes

  • Added @faker-js to transformScopes in test/jest-config.ts to enable Jest transformation of the faker package
  • Fixed typo in comment: "pacakges" → "packages"

The faker v10+ package ships with "type": "module" and requires explicit inclusion in Jest's transform configuration alongside other ES module dependencies like @microsoft and @octokit.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits February 12, 2026 13:55
Co-authored-by: ginsbach <12936686+ginsbach@users.noreply.github.com>
Co-authored-by: ginsbach <12936686+ginsbach@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 12, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • update.code.visualstudio.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/vscode-codeql/vscode-codeql/extensions/ql-vscode/node_modules/.bin/jest --projects test/vscode-tests/activated-extension (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/vscode-codeql/vscode-codeql/extensions/ql-vscode/node_modules/.bin/jest --projects test/vscode-tests/cli-integration --verbose trip-types (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Update @faker-js/faker from 9.0.3 to 10.3.0 Fix Jest ES module import for @faker-js/faker v10+ Feb 12, 2026
Copilot AI requested a review from ginsbach February 12, 2026 13:58
@ginsbach ginsbach marked this pull request as ready for review February 12, 2026 14:25
@ginsbach ginsbach requested a review from a team as a code owner February 12, 2026 14:25
Copilot AI review requested due to automatic review settings February 12, 2026 14:25
@ginsbach ginsbach merged commit 987dd71 into dependabot/npm_and_yarn/extensions/ql-vscode/faker-js/faker-10.3.0 Feb 12, 2026
15 checks passed
@ginsbach ginsbach deleted the copilot/sub-pr-4301 branch February 12, 2026 14:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the shared Jest transform ignore configuration for the extensions/ql-vscode test suite so Jest can transpile the ESM-only @faker-js/faker v10+ dependency, preventing Cannot use import statement outside a module failures.

Changes:

  • Added @faker-js to the transformScopes allowlist so modules under that scope are transformed by Jest.
  • Corrected a typo in a comment (“pacakges” → “packages”).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants